package com.decorator.demo1.impl;

import com.decorator.demo1.Person;

/**
 * decorator装饰抽象类，继承了Component，从外类来扩展Component类的功能，但对于Component类来说，
 * 是无需知道decorator的存在的
 *
 * @author Administrator
 *
 */
public class Finery extends Person {

	protected Person component;

	public void decorate(Person component) {
		this.component = component;
	}

	@Override
	public void show() {
		if (component != null) {
			component.show();
		}
	}

}
